import { ExtractPropTypes } from 'vue'

export type IInputType = 'text' | 'password'

export const inputProps = {
  modelValue: {
    type: [String, Number],
    default: ''
  },
  type: {
    type: String,
    default: 'text'
  },
  disabled: {
    type: Boolean,
    default: false
  },
  readonly: {
    type: Boolean,
    default: false
  },
  round: {
    type: Number
  },
  placeholder: {
    type: String,
    default: ''
  },
  width: {
    type: [String, Number],
    default: ''
  }
}

export type InputProps = ExtractPropTypes<typeof inputProps>

export const inputEmit = ['update:modelValue', 'focus', 'blur', 'change', 'keydown']

export type InputEmit = typeof inputEmit
